var limsSampleType = Gikam.getPageObject({

    baseUrl : IFM_CONTEXT + '/secure/basemodule/basedata/sample-types',
    categoryUrl : IFM_CONTEXT + '/secure/basemodule/basedata/sample-categories',

    getSampleCategoryListColumns : function() {
        return [ {
            checkbox : true
        }, {
            index : true
        }, {
            field : 'sampleCategoryCode',
            width : 200,
            validators : ['notEmpty'],
            title : 'T_LIMS_SAMPLE_CATEGORY.SAMPLECATEGORYCODE'
        },{
            field : 'sampleCategoryName',
            title : 'T_LIMS_SAMPLE_CATEGORY.SAMPLECATEGORYNAME',
            validators : ['notEmpty','strLength[0,100]'],
            width : 200,
            editor : true
        }, {
            field : 'derivativeType',
            title : 'T_LIMS_SAMPLE_CATEGORY.DERIVATIVETYPE',
            validators : ['notEmpty'],
            type : 'select',
            firstBlank : false,
            width : 100,
            category : 'sys',
            param : {
                codeCategoryId_EQ : 'derivativeType'
            },
            editor : true
        } ];
    },

    getChooseListColumns : function() {
        return [ {
            index : true
        }, {
            field : 'sampleTypeCode',
            title : 'T_LIMS_SAMPLE_TYPE.SAMPLETYPECODE',
            width : 200
        }, {
            field : 'sampleTypeName',
            title : 'T_LIMS_SAMPLE_TYPE.SAMPLETYPENAME',
        }];
    },

    getSampleCategoryFormFields : function() {
        return [ {
            field : 'sampleCategoryCode',
            title : 'T_LIMS_SAMPLE_CATEGORY.SAMPLECATEGORYCODE',
            validators : [ 'notEmpty','remote[/secure/basemodule/basedata/sample-categories/{sampleCategoryCode}action/validate-unique]', 'notEmpty', 'strLength[0,50]' ],
            preInsert : true
        },{
            field : 'sampleCategoryName',
            title : 'T_LIMS_SAMPLE_CATEGORY.SAMPLECATEGORYNAME',
            validators : ['notEmpty','strLength[0,100]'],
            preInsert : true
        },{
            field : 'derivativeType',
            title : 'T_LIMS_SAMPLE_CATEGORY.DERIVATIVETYPE',
            validators : ['notEmpty'],
            type : 'select',
            category : 'sys',
            firstBlank : false,
            param : {
                codeCategoryId_EQ : 'derivativeType'
            },
            preInsert : true
        } ];
    },

    getSampleTypeListColumns : function () {
        return[{
            checkbox : true
        },{
            index : true
        },{
            field : 'sampleTypeCode',
            title : 'T_LIMS_SAMPLE_TYPE.SAMPLETYPECODE',
            validators : ['notEmpty']
        },{
            field : 'sampleTypeName',
            title : 'T_LIMS_SAMPLE_TYPE.SAMPLETYPENAME',
            validators : ['notEmpty','strLength[0,60]'],
            editor : true
        },{
            field : 'briefCode',
            title : 'T_LIMS_SAMPLE_TYPE.BRIEFCODE',
            validators : ['notEmpty','strLength[0,60]'],
            editor : true
        }]
    },

    getSampleTypeFormFields : function () {
        return[{
            field : 'sampleTypeCode',
            title : 'T_LIMS_SAMPLE_TYPE.SAMPLETYPECODE',
            validators: ['remote[/secure/basemodule/basedata/sample-types/action/validate-unique]', 'notEmpty', 'strLength[0,60]'],
            preInsert : true
        },{
            field : 'sampleTypeName',
            title : 'T_LIMS_SAMPLE_TYPE.SAMPLETYPENAME',
            validators : ['notEmpty','strLength[0,60]'],
            preInsert : true
        },{
            field : 'briefCode',
            title : 'T_LIMS_SAMPLE_TYPE.BRIEFCODE',
            validators : ['notEmpty','strLength[0,60]'],
            preInsert : true
        }]
    }
});
